home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / domacnost a kancelar / autoit / autoit-v3-setup.exe / Examples / Helpfile / _GUICtrlComboInitStorage.au3 < prev    next >
Text File  |  2007-09-08  |  764b  |  25 lines

  1. #include <GuiConstants.au3>
  2. #include <GuiCombo.au3>
  3.  
  4. Opt('MustDeclareVars',1)
  5.  
  6. Dim $Combo,$ret,$Btn_Exit,$Status,$msg,$allocated
  7.  
  8. GuiCreate("ComboBox Init Storage", 392, 254)
  9.  
  10. $Combo = GuiCtrlCreateCombo("", 70, 10, 270, 100,$CBS_SIMPLE)
  11. $allocated = _GUICtrlComboInitStorage($Combo, 26, 50)
  12. $ret = _GUICtrlComboAddDir($Combo,"drives")
  13. $Btn_Exit = GuiCtrlCreateButton("Exit", 150, 180, 90, 30)
  14. $Status = GUICtrlCreateLabel("",0,234,392,20,BitOR($SS_SUNKEN,$SS_CENTER))
  15. GUICtrlSetData($Status,"Pre-Allocated Memory For: " & $allocated & " Items, Drives Added To ComboBox: " & _GUICtrlComboGetCount($Combo))
  16. GuiSetState()
  17. While 1
  18.     $msg = GuiGetMsg()
  19.     Select
  20.         Case $msg = $GUI_EVENT_CLOSE Or $msg = $Btn_Exit
  21.             ExitLoop
  22.     EndSelect
  23. WEnd
  24. Exit
  25.